package com.qijian.maindata.domain.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@HeadStyle(fillForegroundColor = 22, horizontalAlignment = HorizontalAlignmentEnum.CENTER, borderTop = BorderStyleEnum.THIN,
        borderRight = BorderStyleEnum.THIN, borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN)
@HeadFontStyle(fontHeightInPoints = 15)
@ContentStyle(borderBottom = BorderStyleEnum.THIN, borderLeft = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN)
@ContentFontStyle(fontHeightInPoints = 15)
@Data
@ColumnWidth(15)
@HeadRowHeight(20)
public class LedgerGaugeExcelVo {

    @ExcelProperty(value = "序号")
    private Integer index;

    @ExcelProperty(value = "量具类型")
    private String type;

    @ExcelProperty(value = "厂区")
    private String factoryArea;

    @ExcelProperty(value = "量具名称")
    private String name;

    @ExcelProperty(value = "型号/规格")
    private String spec;

    @ExcelProperty(value = "本厂编号")
    private String localNo;

    @ExcelProperty(value = "精度")
    private String precise;

    @ExcelProperty(value = "出厂编号")
    private String outNo;


    @ExcelProperty(value = "检定日期")
    @DateTimeFormat(value = "yyyy-MM-dd")
    private Date inspectionDate;

    @ExcelProperty(value = "管理方式")
    private String manageStyle;

    @ExcelProperty(value = "下次检定日期")
    @DateTimeFormat(value = "yyyy-MM-dd")
    @ColumnWidth(20)
    private Date nextInspectionDate;


    @ExcelProperty(value = "到时提醒")
    @ColumnWidth(40)
    private String tip;

    @ExcelProperty(value = "使用单位")
    private String useDeptName;

    @ExcelProperty(value = "备注")
    private String remark;

    @ExcelProperty(value = "检定期限")
    private String periodType;

    @ExcelProperty(value = "检定方式")
    private String inspectionType;

    //计算到期时间
    @ExcelIgnore
    private Integer diffDays;
}
